#ifndef MEMORY_BRIDGE_OCK_HMM_PARAM_RANGE_CONF_H
#define MEMORY_BRIDGE_OCK_HMM_PARAM_RANGE_CONF_H
#include <cstdint>
#include <ostream>

namespace ock {
namespace conf {

template <typename T>
struct ParamRange
{
    ParamRange(T minValue, T maxValue) : minValue(minValue), maxValue(maxValue) {}

    bool IsIn(const T & value) const
    {
        return minValue <= value && value <= maxValue;
    }
    bool IsNot(const T & value) const
    {
        return value < minValue || value > maxValue;
    }
    T minValue;
    T maxValue;

};


template <typename T>
bool operator==(const ParamRange<T> &lhs, const ParamRange<T> &rhs)
{
    return lhs.minValue == rhs.minValue && lhs.maxValue == rhs.maxValue;
}

template <typename T>
bool operator!=(const ParamRange<T> &lhs, const ParamRange<T> &rhs)
{
    return !(lhs == rhs);
}

template <typename T>
std::ostream &operator<<(std::ostream &os, const ParamRange<T> &data)
{
    return os << "[" << data.minValue << ", " << data.maxValue << "]";
}

}
}
#endif